package com.tedu.controller;

import com.tedu.pojo.Addr;
import com.tedu.service.AddrService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Controller
public class AddrController {
    @Autowired
    private AddrService addrService;
    @GetMapping("selectById")
    public List<Addr> selectById(){
        return addrService.selectById(1);
    }
    @RequestMapping(value = "/gotoLogin")
    public String userLogin() {
        return "login";
    }

    /**
     *  用户注册的跳转
     * @return
     */
    @RequestMapping("/gotoReg")
    public String register() {
        return "regist";
    }
    @RequestMapping(value="/")
    public String index(){

        return "index";
    }


}
